// 判断值类型
// string
console.log(Object.is('foo', 'foo')); // true
console.log(Object.is('foo', 'foo1')); // false
// number
console.log(Object.is(123, 123)); // true
console.log(Object.is(123, 12)); // false
// boolean
console.log(Object.is(true, true)); // true
console.log(Object.is(true, false)); // false
// undefined
console.log(Object.is(undefined, 12)); // false
console.log(Object.is(undefined, undefined));  // true

// 判断引用类型
console.log(Object.is(null, null));  // true
console.log(Object.is(window, window));  // true
console.log(Object.is(window, null));  // false
console.log(Object.is({a:1}, {a:1}));  // false
console.log(Object.is(["aa"], ["aa"]));  // false
const obj1 = {
  a: 1
};
console.log(Object.is(obj1, obj1));  // true
const arr1 = ["aa"];
console.log(Object.is(arr1, arr1));  // true

// 特殊
console.log(Object.is(+0, -0));  // false
console.log(Object.is(0, -0));  // false
console.log(Object.is(NaN, 0/0));  // true
